﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ComputerizedRehabForms
{
    public partial class BLBTestForm : Form
    {
        bool started = false;
        public static int mouse_x;
        public static int mouse_y;
        public static Point Position { get; set; }
        public BLBTestForm()
        {
            InitializeComponent();
                      
        }

        

        private void BLBTestForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            Application.Exit();
        }

        private void ss_button_Click(object sender, EventArgs e)
        {
            if (!started)
            {
                started = true;
                
            }
            else
            {
                started = false;
                DataManager.hideBLBTest();
                DataManager.showBLBResults();
            }
        }

        private void back_button_Click(object sender, EventArgs e)
        {
            DataManager.hideBLBTest();
            DataManager.showLogin();
        }    

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            Graphics g;

            g = e.Graphics;

            Pen myPen = new Pen(Color.Black);
            myPen.Width = 10;
            int screen_width = this.Width;
            int screen_height = this.Height;
            g.DrawLine(myPen, 300, screen_height / 2, screen_width - 300, screen_height / 2);

        }

        private void BLBTestForm_Click(object sender, EventArgs e)
        {
            if (started)
            {
                this.Cursor = new Cursor(Cursor.Current.Handle);
                
                mouse_x = PointToClient(Cursor.Position).X;
                mouse_y = PointToClient(Cursor.Position).Y;

                //MessageBox.Show(this.PointToClient(Cursor.Position).ToString()); 
       
            }

        }

       
    }
}
